package com.wt.springsamples.juc;

import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;

public class MyRejectedExecutionHandler implements RejectedExecutionHandler {
    @Override
    public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
        System.out.println("CorePoolSize:"+executor.getCorePoolSize()+"<><>MaximumPoolSize:"
                +executor.getMaximumPoolSize()+"ActiveCount"+executor.getActiveCount()+"queen size:"+executor.getQueue().remainingCapacity());
    }
}
